
function arrS() {
    window.str="";
    window.SAddressArr =[];
    window.funArr = [];
    window.uidArr = [];
    window.ImageUrlArr = [];
    window.SNameArr = [];
    window.SGroupArr = [];
}
function submit() {
    arrS()
    $.get("index/findAllSoftware", {}, function (result) {
        if (!result.flag) {
            window.location.href = "login.html"
        } else {
            $.each(result.data, function (i, item) {

                var uid = item.uid;
                var ImageUrl = item.imgUrl;
                var SAddress = item.saddress;
                var SGroup = item.sgroup;
                var SName = item.sname;
                var SFun = item.sfun
                funArr.push(SFun)
                uidArr.push(uid)
                ImageUrlArr.push(ImageUrl)
                SAddressArr.push(SAddress)
                SGroupArr.push(SGroup)
                SNameArr.push(SName)

            })
            CharacterConcatenation();
        }
    })
}

function CharacterConcatenation() {


    for (let i = 0; i < uidArr.length; i++) {
        str += '<div style="display: inline-block; ;margin-left: 6%;float: left" onclick="' + funArr[i] + '">'
            + '<div >'
            + '<img class="cardImg" style="opacity: .8;border-radius: 25px" src=' + ImageUrlArr[i] + '  height="130" width="120">'
            + '<br id="one1">'
            + '<span class="cardText">'
            + SNameArr[i]
            + '</span>'
            + '</div>'
            + '</div>'
            + '<script>'
            + ' function ' + funArr[i] + '{'
            + '     window.location.href ="' + SAddressArr[i] + '";'
            + ' }'
            + ' <\/script>';



    }
    $("#two").append(str)
}
function getPageUrl() {
    return window.location.pathname
}


